<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('Shopgoods/index')}">商品列表</a></li>
			<li class="active"><a >{:lang('EDIT')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Shopgoods/editPost')}">
            
            
            <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required"></span>用户:</label>
				<div class="col-md-6 col-sm-10" style="padding-top:7px;">
					{$data['userinfo']['user_nickname']} ({$data['uid']})
				</div>
			</div>
            
            <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required"></span>商品名称:</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" value="{$data['name']}" readonly="readonly">
				</div>
			</div>

			<if condition="$data['type'] eq 0">
				<div class="form-group">
					<label for="input-one_class" class="col-sm-2 control-label"><span class="form-required"></span>商品所属一级分类:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-one_class" value="{$data['oneclass_name']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-two_class" class="col-sm-2 control-label"><span class="form-required"></span>商品所属二级分类:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-two_class" value="{$data['twoclass_name']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-three_class" class="col-sm-2 control-label"><span class="form-required"></span>商品所属三级分类:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-three_class" value="{$data['threeclass_name']}" readonly="readonly">
					</div>
				</div>

				<if condition="$data['video_url'] neq ''">
					<div class="form-group">
						<label for="input-video" class="col-sm-2 control-label"><span class="form-required"></span>商品视频:</label>
			            <div class="col-md-6 col-sm-10">
			                <div class="playerzmblbkjP" id="playerzmblbkjP" style="width:auto;height:300px;"></div>
			            </div>
			        </div>
		        </if>

		        <div class="form-group">
					<label for="input-content" class="col-sm-2 control-label"><span class="form-required"></span>商品内容:</label>
					<div class="col-md-6 col-sm-10">
						<textarea class="form-control" id="input-content">{$data['content']}</textarea> 
					</div>
				</div>

				<div class="form-group">
					<label for="input-thumbs" class="col-sm-2 control-label"><span class="form-required"></span>商品内容图集:</label>
					<div class="col-md-6 col-sm-10">
						<volist name="$data['picture_arr']" id="vo">
							<img src="{$vo}" style="width: 150px;height: auto;margin-right: 30px;margin-top: 20px;" class="imgtip">
						</volist>
					</div>
				</div>

				<volist name="$data['spec_arr']" id="vo">
				
					<div class="form-group">
						<label class="col-sm-2 control-label"><span class="form-required"></span>商品规格名称:</label>
						<div class="col-md-6 col-sm-10">
							<input type="text" class="form-control" value="{$vo['spec_name']}" readonly="readonly">
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label"><span class="form-required"></span>商品规格库存:</label>
						<div class="col-md-6 col-sm-10">
							<input type="text" class="form-control" value="{$vo['spec_num']}" readonly="readonly">
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label"><span class="form-required"></span>商品规格单价(元):</label>
						<div class="col-md-6 col-sm-10">
							<input type="text" class="form-control" value="{$vo['price']}" readonly="readonly">
						</div>
					</div>

				</volist>

				<div class="form-group">
					<label for="input-postage" class="col-sm-2 control-label"><span class="form-required"></span>商品邮费:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-postage" value="{$data['postage']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-sale_nums" class="col-sm-2 control-label"><span class="form-required"></span>商品总销量:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-sale_nums" value="{$data['sale_nums']}" readonly="readonly">
					</div>
				</div>

			<else />

				<div class="form-group">
					<label for="input-href" class="col-sm-2 control-label"><span class="form-required"></span>商品外链地址:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-href" value="{$data['href']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-original_price" class="col-sm-2 control-label"><span class="form-required"></span>商品原价:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-original_price" value="{$data['original_price']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-present_price" class="col-sm-2 control-label"><span class="form-required"></span>商品现价:</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-present_price" value="{$data['present_price']}" readonly="readonly">
					</div>
				</div>

				<div class="form-group">
					<label for="input-goods_desc" class="col-sm-2 control-label"><span class="form-required"></span>商品简介:</label>
					<div class="col-md-6 col-sm-10">
						<textarea class="form-control" id="input-goods_desc">{$data['goods_desc']}</textarea> 
					</div>
				</div>

			</if>

			
			   
            
            <div class="form-group">
				<label for="input-thumbs" class="col-sm-2 control-label"><span class="form-required"></span>商品封面图:</label>
				<div class="col-md-6 col-sm-10">
					<volist name="$data['thumb_arr']" id="vo">
						<img src="{$vo}" style="width: 150px;height: auto;margin-right: 30px;margin-top: 20px;" class="imgtip">
					</volist>
				</div>
			</div>
            


			<if condition="$data['status'] neq '1'">
				<div class="form-group">
	                <label for="input-status" class="col-sm-2 control-label"><span class="form-required">*</span>商品状态:</label>
	                <div class="col-md-6 col-sm-10">
	                    <select class="form-control" name="status">
	                        <volist name="status" id="vo">
	                        	<option value="{$key}" <if condition="$data['status'] eq $key">selected</if>>{$vo}</option>
	                        </volist>
	                        
	                    </select>
	                </div>
	            </div>

	            <div class="form-group">
					<label for="input-refuse_reason" class="col-sm-2 control-label"><span class="form-required"></span>商品拒绝原因:</label>
					<div class="col-md-6 col-sm-10">
						<textarea name="refuse_reason" style="width: 100%;min-height: 100px;">{$data['refuse_reason']}</textarea>
					</div>
				</div>

	        <else />
	        <div class="form-group">
				<label for="input-postage" class="col-sm-2 control-label"><span class="form-required"></span>商品状态:</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-postage" value="{$status[$data['status']]}" readonly="readonly">
				</div>
			</div>



	        </if>

            <div class="form-group">
				<label for="input-hits" class="col-sm-2 control-label"><span class="form-required"></span>商品访问量:</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-hits" value="{$data['hits']}" readonly="readonly">
				</div>
			</div>

			<div class="form-group">
				<label for="input-share_income" class="col-sm-2 control-label"><span class="form-required"></span>用户分享后被购买获得的佣金:</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-share_income" value="{$data['share_income']}" readonly="readonly">
				</div>
			</div>

            <div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$data.id}" />
					<if condition="$data['status'] neq '1'">
						<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
					</if>
					<a class="btn btn-default" href="{:url('Shopgoods/index')}">{:lang('BACK')}</a>
				</div>
			</div>

		</form>
	</div>

    <script src="__STATIC__/js/admin.js"></script>
    <if condition="$data['video_url'] neq ''">
		<script src="__STATIC__/xigua/xgplayer.js?t=1574906138" type="text/javascript"></script>
	    <script src="__STATIC__/xigua/xgplayer-flv.js.js" type="text/javascript"></script>
	    <script src="__STATIC__/xigua/xgplayer-hls.js.js" type="text/javascript"></script>
	    <script src="__STATIC__/xigua/player.js" type="text/javascript"></script>
	    <script>
	    (function(){
	        var pull='{$data['video_url']}';
	        if(pull){
	            xgPlay('playerzmblbkjP',pull);
	        }
	    })()
	    </script>

	</if>
</body>
</html>
